package com.somsoft.handjc.activity.tongji.xuncha;

import java.util.ArrayList;
import java.util.List;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ArrayAdapter;
import android.widget.ListView;

import com.somsoft.handjc.activity.R;
import com.somsoft.handjc.util.BaseActivity;
import com.somsoft.handjc.util.MyApplication;
import com.somsoft.handjc.util.Utils;

/**
 * 统计分析 菜单列表
 * @author Administrator
 *
 */
public class XunChaTongJiMainActivity extends BaseActivity implements OnItemClickListener{

	private ListView listView; 
    @Override 
    public void onCreate(Bundle savedInstanceState){ 
        super.onCreate(savedInstanceState); 
        MyApplication.getInstance().addActivity(this);
        listView = new ListView(this); 
        listView.setAdapter(new ArrayAdapter<String>(this, R.layout.simple_list_item_1,getData())); 
        setContentView(listView); 
        setTitle("效率巡查统计分析");
        listView.setOnItemClickListener(this);
    } 

    private List<String> getData(){ 
        List<String> data = new ArrayList<String>(); 
        data.add("业务量统计图"); 
//        data.add("业务量折线图"); 
        data.add("投资类型统计图"); 
        data.add("巡查业务对比图"); 
        data.add("各单位业务对比图"); 
        data.add("投资完成情况统计图"); 
        return data; 
    }

	@Override
	public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
		Intent it = null;
		switch (arg2) {
		case 0:
			it = new Intent(XunChaTongJiMainActivity.this,BusinessCountBarActivity.class);
			break;
		case 1:
			it = new Intent(XunChaTongJiMainActivity.this,TouzhiTypePieActivity.class);
			break;
		case 2:
			it = new Intent(XunChaTongJiMainActivity.this,PatrolDuibiBarActivity.class);
			break;
		case 3:
			it = new Intent(XunChaTongJiMainActivity.this,BusinessDuibiBarActivity.class);
			break;
		case 4:
			it = new Intent(XunChaTongJiMainActivity.this,TouzhiFinishBarActivity.class);
			break;
//		case 5:
//			it = new Intent(XunChaTongJiMainActivity.this,MonthInfoChart.class);
//			break;
		default:
			break;
		}
		Utils.openLoading(XunChaTongJiMainActivity.this);
		startActivity(it);
	} 


}
